package formBean;

import java.util.ArrayList;
import java.util.List;

import org.mybeans.form.FormBean;

public class DeleteBookmarkForm extends FormBean{

	private String url;

	/**
	 * @return the url
	 */
	public String getUrl() {
		return url;
	}

	/**
	 * @param url the url to set
	 */
	public void setUrl(String url) {
		this.url = url;
	}
	
	public List<String> getValidationErrors(){
		List<String> errors = new ArrayList<String>();
		if(url == null || url.length() < 1){
			errors.add("Can't delete this URL");
		}
		if(url.contains("<") || url.contains(">") || url.contains("'") || url.contains("\"")){
			errors.add("can't delete this URL");
		}
		return errors;
	}
}
